package com.myworld.config.httpClient;

import org.apache.http.client.ClientProtocolException;

import java.io.IOException;
import java.util.Map;

public interface HttpClientApiService {
	//向第三方平台做http请求
	//参数访问地址，json对象
	public HttpResult doPostJson(String url, String json) throws ClientProtocolException, IOException;
	/** 
     * 提交json数据 
     * 
     * @param url 
     * @param json 
     * @param header 额外添加的协议头
     * @return 
     * @throws ClientProtocolException 
     * @throws IOException 
     */  
    public HttpResult doPostJson(String url, String json, Map<String, String> header) throws ClientProtocolException, IOException ;
	/**
	 * post 请求,map参数
	 * @param url
	 * @param parameters
	 * @return
	 * @throws ClientProtocolException
	 * @throws IOException
	 */
	public HttpResult doPost(String url, Map<String, String> parameters) throws ClientProtocolException, IOException;

}
